//
//  UFNetWorkAPIClient.h
//  universityFace
//
//  Created by 阮 沧晖 on 14-9-26.
//  Copyright (c) 2014年 阮 沧晖. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DDSharedUser.h"
@interface DDNetWorkAPIClient : NSObject
{
    DDSharedUser *sharedUser;
}
/*
 认证接口
 */
//user auth token
-(void)userAuthToken:(NSString *)phoneNum password:(NSString*)password CompletionBlock:(void (^)(BOOL isSuccess,NSDictionary*dict, NSString *message, NSString *status))completionBlock;
-(void)userLoginOut:(void (^)(BOOL isSuccess,NSDictionary *dict, NSString *message, NSString *status))completionBlock;
-(void)userRefreshAuthToken:(void (^)(BOOL isSuccess,NSDictionary*dict, NSString *message, NSString *status))completionBlock;

/*
 平台接口
 */

#pragma mark -用户相关
//获取当前用户信息
-(void) getUserInfo:(NSString *)access_token completionBlock:(void (^)(BOOL isSuccess,NSDictionary *dict, NSString *message, NSString *status))completionBlock;
//查询是否有绑定第三方账号
- (void)isBind:(NSString *)source accessToken:(NSString *)accessToken completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
//绑定第三方账号
- (void)bindAccountd:(NSString *)user_accessToken openId:(NSString *)openId nickName:(NSString *)nickName accessToken:(NSString *)accessToken source:(NSString *)source validity:(NSString *)validity completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//检查是否为注册用户
- (void)isOpen:(NSString *)userName CompletionBlock:(void (^)(BOOL isSuccess,NSDictionary*dict, NSString *message, NSString *status))completionBlock;
//获取手机验证码
- (void)userPhoneCode:(NSString *)phoneNumber completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//重置用户密码
- (void)resetPassword:(NSString*)phoneNum phoneCode:(NSString *)phoneCode passwordType:(NSString *)passwordType password:(NSString *)password completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//注册用户
-(void) userRegister:(NSString *)phoneNum phoneCode:(NSString *)phoneCode password:(NSString *)password nickName:(NSString *)nickName fid:(NSString *)fid completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status, NSDictionary *result))completionBlock;
//修改用户信息
- (void)userEdit:(NSString *)userName nickName:(NSString *)nickName name:(NSString *)name gender:(NSString *)gender birthday:(NSString *)birthday phoneNum:(NSString *)phoneNum school:(NSString *)school grade:(NSString *)grade clzss:(NSString *)clzss recent:(NSString *)recent topicId:(NSString*)topicId completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//修改用户密码
- (void)passwordChange:(NSString *)type oldPassword:(NSString *)oldPassword password:(NSString *)password completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//修改用户头像
- (void)avatarSave:(NSString *)data completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//获取用户头像地址
- (void)userAvatar:(NSString *)uid size:(NSString *)size completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status))completionBlock;
//批量获取用户头像地址
- (void)avatarGet:(NSArray *)uids size:(NSString *)size completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
//更新用户心情
- (void)recentSave:(NSString *)content completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
//分享纪录
- (void)dailyShare:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
//用户签到
- (void)dailySign:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;


#pragma mark -主业务
//加载问题列表
-(void) mainTopicList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取默认的科目列表
-(void)mainDefaultCourseList:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取我的科目列表
-(void) mainCoursetList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//增加我的科目
-(void) mainCoursetAdd:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//修改科目
-(void)mainCourseEdit:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//增加用户题目标签
-(void) mainTopicTagAdd:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//保存题目
-(void) mainQuestionSave:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取我的题库
-(void) mainQuestionList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//上传发布
-(void) mainTopicSave:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取我的发布
-(void) mainMyTopicList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取发布详情
-(void)mainTopicDetail:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status, id object))completionBlock;
//修改发布
-(void)mainTopicEdit:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status, id object))completionBlock;

//提交回答
-(void) mainAnswerSave:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//保存收藏
-(void)mainMarkSave:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
-(void)mainMarkRemove:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//收藏列表
- (void)markList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取我的回答
-(void) mainAnswerList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取作答统计
-(void) mainAnswerStat:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取答题列表
-(void) mainAnswerUser:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取问题回答列表
-(void) mainQuestionAnswerList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//对作答进行评分
-(void) mainQuestionAnswerEvaluate:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//追问
-(void) mainQuestionReply:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//获取追问列表
-(void) mainQuestionReplyList:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
//采纳答案
-(void) mainQuestionAnswerAdopt:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;

///作答提交（目前提交后只处理下发推送的功能）
-(void) mainANswerSubmit:(NSDictionary *)mainParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
#pragma mark -通用接口
//获取系统时间
- (void)getSystime:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
- (void)uploadFile:(NSDictionary *)commonParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
- (void)uploadImage:(NSDictionary *)commonParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
- (void)feekback:(NSDictionary *)commonParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)getAbout:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;
- (void)getCheckVersion:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)adList:(NSDictionary *)commonParams completionBlock:(void (^)(BOOL isSuccess, NSString *message, NSString *status,id object))completionBlock;

#pragma mark - 积分接口
- (void)queryIntegral:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)gitGave:(NSDictionary *)integralParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)giftQuery:(NSDictionary *)integralParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;


#pragma mark - 礼品接口
- (void)queryGitf:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)queryGitfOrder:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)gitExchange:(NSDictionary *)integralParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
#pragma mark - 收货地址
- (void)queryAddress:(void (^)(BOOL isSuccess, id address, NSString *message, NSString *status))completionBlock;
- (void)addAddress:(NSDictionary *)addressParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
- (void)updateAddress:(NSDictionary *)addressParams completionBlock:(void (^)(BOOL isSuccess, NSDictionary *dict, NSString *message, NSString *status))completionBlock;
@end
